home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 22 / AACD 22.iso / AACD / Programming / powerd / lib / startup_ieee.ass < prev    next >
Encoding:
Text File  |  1980-12-11  |  1.7 KB  |  81 lines

  1. _START    move.l    a0,_arg
  2.     clr.b    (-1,a0,d0.w)
  3.     movea.l    $4.w,a6
  4.     lea    (DOSName,pc),a1
  5.     moveq    #37,d0
  6.     jsr    (-552,a6)        ; OpenLibrary()
  7.     move.l    d0,_DOSBase
  8.     beq.s    .FINISH
  9.  
  10.     movea.l    d0,a6
  11.     jsr    (-60,a6)        ; Output()
  12.     move.l    d0,_stdout
  13.     jsr    (-54,a6)        ; Input()
  14.     move.l    d0,_stdin
  15.  
  16.     movea.l    $4.w,a6
  17.     lea    (IntName,pc),a1
  18.     moveq    #37,d0
  19.     jsr    (-552,a6)        ; OpenLibrary()
  20.     move.l    d0,_IntuitionBase
  21.     beq.s    .CLOSEDOS
  22.  
  23.     lea    (GfxName,pc),a1
  24.     moveq    #37,d0
  25.     jsr    (-552,a6)        ; OpenLibrary()
  26.     move.l    d0,_GfxBase
  27.     beq.s    .CLOSEINT
  28.  
  29.     lea    (BasName,pc),a1
  30.     moveq    #0,d0
  31.     jsr    (-552,a6)        ; OpenLibrary()
  32.     move.l    d0,_MathIEEEDoubBasBase
  33.     beq.s    .CLOSEGFX
  34.  
  35.     lea    (TraName,pc),a1
  36.     moveq    #0,d0
  37.     jsr    (-552,a6)        ; OpenLibrary()
  38.     move.l    d0,_MathIEEEDoubTransBase
  39.     beq.s    .CLOSEBAS
  40.  
  41.     xref    _main
  42.     jsr    _main        ; a6 is stored
  43.     move.l    d0,d2
  44.  
  45.     movea.l    _MathIEEEDoubTransBase,a1
  46.     jsr    (-414,a6)        ; CloseLibrary()
  47. .CLOSEBAS    movea.l    _MathIEEEDoubBasBase,a1
  48.     jsr    (-414,a6)        ; CloseLibrary()
  49. .CLOSEGFX    movea.l    _GfxBase,a1
  50.     jsr    (-414,a6)        ; CloseLibrary()
  51. .CLOSEINT    movea.l    _IntuitionBase,a1
  52.     jsr    (-414,a6)        ; CloseLibrary()
  53. .CLOSEDOS    movea.l    _DOSBase,a1
  54.     jsr    (-414,a6)        ; CloseLibrary()
  55. .FINISH    move.l    d2,d0
  56.     rts
  57. ****************************************
  58.     xdef    _DOSBase
  59.     xdef    _MathIEEEDoubBasBase
  60.     xdef    _MathIEEEDoubTransBase
  61.     xdef    _IntuitionBase
  62.     xdef    _GfxBase
  63.     xdef    _arg
  64.     xdef    _stdout
  65.     xdef    _stdin
  66. ****************************************
  67. _DOSBase            dc.l    0
  68. _MathIEEEDoubBasBase    dc.l    0
  69. _MathIEEEDoubTransBase    dc.l    0
  70. _IntuitionBase        dc.l    0
  71. _GfxBase            dc.l    0
  72. _arg            dc.l    0
  73. _stdout            dc.l    0
  74. _stdin            dc.l    0
  75. ****************************************
  76. DOSName    dc.b    'dos.library',0
  77. IntName    dc.b    'intuition.library',0
  78. GfxName    dc.b    'graphics.library',0
  79. BasName    dc.b    'mathieeedoubbas.library',0
  80. TraName    dc.b    'mathieeedoubtrans.library',0
  81.